Some unmanned aerial vehicles (UAVs) are capable of travelling between destinations with little or no input from a human user. Although general route information may be determined in advance of a flight, an UAV may also need to dynamically sense and avoid obstacles such as buildings, trees, or even other vehicles while in route to a destination. Some UAVs utilize stereo vision systems to sense and avoid obstacles by comparing two or more images of the obstacles to calculate relative location and/or depth information associated with an obstacle. In particular, these systems can sense and locate an obstacle by first determining a disparity between two images containing the obstacle and then performing geometrical calculations using this determined disparity in conjunction with known camera geometry. The ability of a stereo camera system to generate quality imagery of obstacles correlates with the system's ability to determine the disparity and, therefore, to sense and avoid obstacles.
Peripheral light sources may cause lens flare to occur in the cameras of a stereo camera system and this may hinder the system's ability to generate quality imagery. For example, lens flare may overexpose portions of images rendering it impossible to sense objects which would have otherwise been captured within those overexposed portions. The problem of lens flare is exacerbated by movement of UAVs which may quickly and unexpectedly alter the position of peripheral light sources with respect to a stereo camera system mounted to the UAV. This is because depending on the specific configuration of a camera's lens system, even small deviations in a camera's orientation with respect to a light source may dramatically increase the occurrence of stray light passing through the lens system and reaching a camera sensor.